<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<%@ include file="head.jsp" %>
<body>
<%@ include file="nav.jsp" %>
<div class="container-fluid">

    <form action="" method="post" enctype="multipart/form-data">
        <div class="form-group">
            <label>名称</label>
            <input type="text" class="form-control" placeholder="名称" name="name" required>
        </div>
        <div class="form-group">
            <label>分类</label>

            <select name="category_id" class="form-control" style="width: 50%">

                <c:forEach items="${categories}" var="category">
                    <option value="${category.id}">${category.name}</option>
                </c:forEach>


            </select>

        </div>
        <div class="form-group">
            <label>LOGO</label>
            <input type="file" placeholder="LOGO" name="logo" required>
        </div>
        <div class="form-group">
            <label>价格</label>
            <input type="text" class="form-control" placeholder="价格" name="price"  required>
        </div>

        <div class="form-group">
            <label>销量</label>
            <input type="text" class="form-control" placeholder="销量" name="sale" value="0" required>
        </div>
        <div class="form-group">
            <label>库存</label>
            <input type="text" class="form-control" placeholder="库存" name="stock" value="9999" required>
        </div>
        <div class="form-group">
            <label>状态</label>
            <div>
                <input type="radio" name="status" value="1" checked class="radio-inline"> 启用
                <input type="radio" name="status" value="0" class="radio-inline"> 禁用
            </div>
        </div>
        <div class="form-group">
            <label>排序</label>
            <input type="text" class="form-control" placeholder="排序" name="sort" value="100" required>
        </div>



        <button type="submit" class="btn btn-success">操作</button>
        <a href="javascript:history.go(-1)" class="btn btn-default">返回</a>
    </form>
</div>

<%@ include file="foot.jsp" %>
</body>
</html>
